# a = b
# print(a)
# print('kkkk')

# try:
#     print('befor')
#     a = b
#     print('afer')
#     print(a)
# except:
#     print('erro')
#
# print('ddddddd')

# try:
#     b = 1
#     a = b
#     print(a)
# except SyntaxError:
#     print('SyntaxError')
# except SystemExit:
#     print('NameError')
# except:
#     print('erro')
# else:
#     print('ppppppp')
# print('ddddddd')

# try:
#     a = b
#     print(a)
# finally:
#     print('llllll')
# print('ddddddd')

try:
    # b = 1
    a = b
    print(a)
except SyntaxError:
    print('SyntaxError')
except SystemExit:
    print('NameError')
except Exception as err:   #如果某个异常不知道，且不是前面两个异常，可以用这个必杀技解决
    print(err)
